import request from '@/utils/request'
/**
 * 库存管理
 *
 */
/**
 * 查询
 * @param {*} data = {pageNo: 0, pageSize: 0, param: {accidentTypeDictId,storeId,tiltle}}
 */
export function page(form, pageSize = 10, currentPage = 1) {
  const data = {
    param: form,
    pageSize: pageSize,
    pageNo: currentPage
  }
  return request.post('/sq/brandStock/page', data)
}

/**
 * /sq/brandStock/partsSelect 配件选择
 * @param {*} data = {pageNo: 0, pageSize: 0, param: {accidentTypeDictId,storeId,tiltle}}
 */
export function partsSelect(params = {}) {
  return request.get('/sq/brandStock/partsSelect', params)
}

/**
 *
/sq/brandStock/detail/{id}详情
 * @param {*} data = {pageNo: 0, pageSize: 0, param: {accidentTypeDictId,storeId,tiltle}}
 */
export function getDetail(id = '') {
  return request.get(`/sq/brandStock/detail/${id}`)
}
/**
 *
/sq/brandStock/detail/{id}详情
 * @param {*} data = {pageNo: 0, pageSize: 0, param: {accidentTypeDictId,storeId,tiltle}}
 */
export function getSitePage(params = {}) {
  return request.post(`/sq/brandStock/storageSitePage/${params.stockId}/${params.siteId}`, params)
}
/**
 *
/sq/brandStock/detail/{id}详情
 * @param {*} data = {pageNo: 0, pageSize: 0, param: {accidentTypeDictId,storeId,tiltle}}
 */
export function getStatPage(params = {}) {
  return request.post(`/sq/brandStock/storageStatPage/${params.stockId}`, params)
}

/**
 *

预警配件分页查询
 * @param {*} data = {pageNo: 0, pageSize: 0, param: {accidentTypeDictId,storeId,tiltle}}
 */
export function alarmPartsPage(params = {}) {
  return request.post(`/sq/brandStock/alarmPartsPage`, params)
}

/**
 *
启用停用
 * @param {*} data = {pageNo: 0, pageSize: 0, param: {accidentTypeDictId,storeId,tiltle}}
 */
export function changeStatus(id = '') {
  return request.get(`/sq/brandStock/status/${id}`)
}

